/**
 * @Copyright: Interactive Business Solution Pte Ltd, Singapore
 * @Author: Li Wen, 2007-11-18
 * @Version: 071118.001
 * Database connection registration manager, the structure stores local database connection
 */
package com.ibsol.database
{
	import flash.data.SQLConnection;

	public class DBConnManager
	{
		private static var dbConnection:Object = new Object();
		/**
		 * Gets local database connection according to connection name
		 * @param: name:String database connection name
		 * @return: SQLConnection database connection registered before
		 */
		public static function getConnection(name:String):SQLConnection
		{
			return dbConnection[name];
		}
		/**
		 * Registers local database connection in DBConnManager structure
		 * @param: name:String database connection name
		 * 		   connection:SQLConnection database connection
		 * @return: void
		 */
		public static function setConnection(name:String, connection:SQLConnection):void
		{
			dbConnection[name] = connection;
		}
		
		
	}
}